home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1984 Half 1 / rerun-1984-01-06-side-b.d64 / sym-code jan p92 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  164 lines

  1. 80 rem *************************
  2. 81 rem ***    symbol code    ***               ***                   ***
  3. 82 rem ***  copyright 1982   ***
  4. 83 rem *** evang. petroutsos ***
  5. 84 rem *************************
  6. 85 rem
  7. 90 rem ** "" cursor down
  8. 91 rem ** "" cursor right
  9. 92 rem ** "" cursor home
  10. 93 rem ** "[147]" clear screen
  11. 94 rem ** "[144]" control-black
  12. 95 rem
  13. 100 l=1137:print"[144]":poke53281,13
  14. 105 dd=1268:ef=0:rv=0:sc=500
  15. 110 restore:fori=1to6:forj=1to4:reada%(i,j):next:next
  16. 120 ef=0:form=1 to 4
  17. 125 d(m)=int(rnd(3)*6)+1:ifd(m)>6then125
  18. 130 ifm=1then140
  19. 135 fori=1tom-1:ifd(m)=d(m-i)then125
  20. 137 next
  21. 140 next
  22. 190 rem ** the subroutines at lines:
  23. 191 rem ** 1000, 1200, 1300
  24. 192 rem ** draw the grid and the symbols193 rem ** on the screen
  25. 200 gosub1000:gosub1300:gosub1200
  26. 202 gosub400
  27. 205 print"score:";sc;"[146]";"average:";v9;"[146]"
  28. 208 getr$:ifr$=""then208
  29. 210 ifr$="[133]"then235:rem f1 function key
  30. 212 ifr$="[136]"then240:rem f7 function key
  31. 213 ifr$=" "then600
  32. 214 ifr$="1"thensd=dd:a1=1:goto500
  33. 215 ifr$="2"thensd=dd+3:a2=1:goto500
  34. 216 ifr$="3"thensd=dd+6:a3=1:goto500
  35. 217 ifr$="4"thensd=dd+9:a4=1:goto500
  36. 220 ifr$="h"thensc=sc-50:goto450
  37. 230 goto205
  38. 235 l1=l:l=l-120:ifl<1137thenl=1737
  39. 236 goto245
  40. 240 l1=l:l=l+120:ifl>1737thenl=1137
  41. 245 gosub1200
  42. 250 goto205
  43. 400 rem ** hidden code **
  44. 402 poke1930,102:poke1931,102:poke1933,102:poke1934,102:poke1936,102
  45. 405 poke1937,102:poke1939,102:poke1940,102
  46. 410 poke1970,102:poke1971,102:poke1973,102:poke1974,102:poke1976,102
  47. 415 poke1977,102:poke1979,102:poke1980,102
  48. 420 print"hidden code";
  49. 430 print"[176][192][192][192][192][192][192][192][192][192][192][192][174]"
  50. 432 print"[221][221]"
  51. 434 print"[221][221]"
  52. 436 print"[173][192][192][192][192][192][192][192][192][192][192][192][189]";:print"":return
  53. 450 rem *** help ***
  54. 455 ifrv=0then q1=1930:goto460
  55. 456 ifrv=1then q1=1933:goto460
  56. 457 ifrv=2then q1=1936:goto460
  57. 458 q1=1939
  58. 460 rv=rv+1:f1=d(rv)
  59. 465 pokeq1,a%(f1,1):pokeq1+1,a%(f1,2):pokeq1+40,a%(f1,3):pokeq1+41,a%(f1,4)
  60. 467 ifr$="h"andrv=4thensc=0:goto822
  61. 470 ifrv=4then 830
  62. 475 ifgg=9thenreturn
  63. 480 goto205
  64. 500 rem*** draw a figure ***
  65. 505 ifl=1137thenfg=1:goto520
  66. 506 ifl=1257thenfg=2:goto520
  67. 507 ifl=1377thenfg=3:goto520
  68. 508 ifl=1497thenfg=4:goto520
  69. 509 ifl=1617thenfg=5:goto520
  70. 510 ifl=1737thenfg=6:goto520
  71. 520 pokesd,a%(fg,1):pokesd+1,a%(fg,2):pokesd+40,a%(fg,3):pokesd+41,a%(fg,4)
  72. 522 r=val(r$):b(r)=fg
  73. 525 goto205
  74. 600 ifa1=0ora2=0ora3=0ora4=0then205
  75. 605 f=0:p=0
  76. 610 a1=0:a2=0:a3=0:a4=0:ef=ef+1
  77. 640 fori1=1to4:ifb(i1)=d(i1)thenp=p+1
  78. 643 next
  79. 650 form=1 to 4:for k=1to4:
  80. 655 fors=1tom-1:if b(m)=b(m-s)thens=m-1:k=4:goto690
  81. 657 nexts
  82. 680 ifb(m)=d(k)thenf=f+1
  83. 685 nextk
  84. 690 nextm
  85. 695 ifp<4thengosub1600
  86. 696 ifp=4thendd=dd+120
  87. 700 rem *** check guess ***
  88. 701 ifef>2thensc=sc-10
  89. 702 dr=dd-120:if f=0then780
  90. 703 ifdd=1268thendr=1868
  91. 705 pokedr+14,81:
  92. 710 if f=1then750
  93. 712 pokedr+55,81
  94. 715 iff=2then750
  95. 717 pokedr+15,81
  96. 718 iff=3then750
  97. 720 pokedr+54,81:
  98. 750 ifp=0then205
  99. 752 pokedr+17,81:ifp=1then205
  100. 753 pokedr+58,81:ifp=2then205
  101. 755 pokedr+18,81:ifp=3then205
  102. 758 pokedr+57,81
  103. 780 ifp<4then205
  104. 800 rem *** correct guess ***
  105. 810 print"":print"gongratulations !!!";
  106. 814 gm=gm+1:sc=sc+10:d9=sc-vg:vg=vg+d9/gm:v9=int(vg)
  107. 816 remprint"";"score:";sc;"[146]";"average:";v9;"[146]"
  108. 820 gg=9:rv=0:gosub450:rv=1:gosub450:rv=2:gosub450:rv=3:gosub450:gg=0
  109. 822 sc=0:gm=gm+1:d9=sc-vg:vg=vg+d9/gm:v9=int(vg)
  110. 823 print"                                 ";
  111. 824 print"";"score:";sc;"[146]";"average:";v9;"[146]";"     "
  112. 825 sc=500:ef=0
  113. 830 getf$:iff$<>"[133]"andf$<>"[134]"andf$<>"[135]"andf$<>"[136]"then830
  114. 840 print"[147]":gg=0:f=0:p=0:dd=1268:l=1137:rv=0:goto100
  115. 1000 print"[147]"
  116. 1002 print"[176][192][192][192][192][192][192][192][192][192][192][192][174] [176][192][192][178][192][192][174]              "
  117. 1004 print"[194]your choice[194] [194]fg[194]ps[194]              "
  118. 1006 print"[173][192][192][192][192][192][192][192][192][192][192][192][189] [173][192][192][177][192][192][189]              "
  119. 1010 print"[176][192][192][178][192][192][178][192][192][178][192][192][174] [176][192][192][178][192][192][174]             "
  120. 1012 print"[221]  [221]  [221]  [221]  [221] [221]  [221]  [221]             "
  121. 1014 print"[221]  [221][160] [221]  [221]  [221] [221]  [221]  [221]             "
  122. 1016 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179]             "
  123. 1018 print"[221]  [221]  [221]  [221]  [221] [221]  [221]  [221]             "
  124. 1020 print"[221]  [221]  [221]  [221]  [221] [221]  [221][160] [221]             "
  125. 1022 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179]             "
  126. 1024 print"[221]  [221]  [221]  [221]  [221] [221]  [221]  [221]             "
  127. 1026 print"[221]  [221]  [221]  [221]  [221] [221]  [221][160] [221]             "
  128. 1028 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179]             "
  129. 1030 print"[221]  [221]  [221]  [221]  [221] [221]  [221]  [221]             "
  130. 1032 print"[221]  [221]  [221]  [221]  [221] [221]  [221][160] [221]             "
  131. 1034 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179]             "
  132. 1036 print"[221]  [221]  [221]  [221]  [221] [221]  [221]  [221]              "
  133. 1038 print"[221]  [221]  [221]  [221]  [221] [221]  [221][160] [221]              "
  134. 1040 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179]              "
  135. 1042 print"[221]  [221]  [221]  [221]  [221] [221]  [221]  [221]              "
  136. 1044 print"[221]  [221]  [221]  [221]  [221] [221]  [221][160] [221]               "
  137. 1046 print"[173][192][192][177][192][192][177][192][192][177][192][192][189] [173][192][192][177][192][192][189]               "
  138. 1050 return
  139. 1200 pokel1,32:pokel1+1,32:pokel1+2,32
  140. 1210 pokel1+40,32:pokel1+41,32:pokel1+42,32
  141. 1220 pokel,233:pokel+1,111:pokel+2,111
  142. 1230 pokel+40,95:pokel+41,119:pokel+42,119:return
  143. 1300 poke1134,160:poke1135,160:poke1174,160:poke1175,160
  144. 1310 poke1254,233:poke1255,223
  145. 1315 poke1294,95:poke1295,105
  146. 1320 poke1374,77:poke1375,78:poke1414,78
  147. 1325 poke1415,77:poke1495,77
  148. 1335 poke1494,78:poke1535,78:poke1534,77
  149. 1340 poke1614,122:poke1615,76
  150. 1345 poke1654,80:poke1655,79
  151. 1350 poke1734,79:poke1735,80:poke1774,76:poke1775,122
  152. 1355 return
  153. 1600 rem** clear area for next guess **
  154. 1615 dd=dd+120:ifsd>1777thendd=1268
  155. 1630 pokedd,32:pokedd+1,32:pokedd+3,32:pokedd+4,32:pokedd+6,32:pokedd+7,32
  156. 1632 pokedd+9,32:pokedd+10,32:pokedd+14,32:pokedd+15,32:pokedd+17,32
  157. 1634 pokedd+18,32
  158. 1635 pokedd+40,32:pokedd+41,32:pokedd+43,32:pokedd+44,32:pokedd+46,32
  159. 1636 pokedd+47,32
  160. 1638 pokedd+49,32:pokedd+50,32:pokedd+54,32:pokedd+55,32:pokedd+57,32
  161. 1639 pokedd+58,32:return
  162. 2000 data160,160,160,160,233,223,95,105,77,78,78,77,78,77,77,78,122,76,80,79
  163. 2010 data79,80,76,122
  164.